package com.ruoyi.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.entity.VerInspiration;
import com.ruoyi.mapper.VerInspirationMapper;
import com.ruoyi.service.VerInspirationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VerInspirationServiceImpl implements VerInspirationService {
    @Autowired
    private VerInspirationMapper verInspirationMapper;

    /**
     * 查询
     *
     * @param id 主键
     * @return
     */
    @Override
    public VerInspiration selectVerInspirationById(Long id)
    {
        return verInspirationMapper.selectVerInspirationById(id);
    }

    /**
     * 查询列表
     *
     * @param verInspiration
     * @return
     */
    @Override
    public List<VerInspiration> selectVerInspirationList(VerInspiration verInspiration)
    {
        return verInspirationMapper.selectVerInspirationList(verInspiration);
    }

    /**
     * 新增
     *
     * @param verInspiration
     * @return 结果
     */
    @Override
    public int insertVerInspiration(VerInspiration verInspiration)
    {
        verInspiration.setCreateTime(DateUtils.getNowDate());
        return verInspirationMapper.insertVerInspiration(verInspiration);
    }

    /**
     * 修改
     *
     * @param verInspiration
     * @return 结果
     */
    @Override
    public int updateVerInspiration(VerInspiration verInspiration)
    {
        verInspiration.setUpdateTime(DateUtils.getNowDate());
        return verInspirationMapper.updateVerInspiration(verInspiration);
    }

    /**
     * 批量删除
     *
     * @param ids 需要删除的主键
     * @return 结果
     */
    @Override
    public int deleteVerInspirationByIds(Long[] ids)
    {
        return verInspirationMapper.deleteVerInspirationByIds(ids);
    }

    /**
     * 删除信息
     *
     * @param id 主键
     * @return 结果
     */
    @Override
    public int deleteVerInspirationById(Long id)
    {
        return verInspirationMapper.deleteVerInspirationById(id);
    }
}
